Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop the robots when the stop receiving packages for 1 sec #168

Merged
merged 4 commits into from
Jan 3, 2024

Conversation

Bollos00
Copy link
Contributor

@Bollos00 Bollos00 commented Oct 2, 2021

Identify the Bug

Closes #166

Description of the Change

  • Whenever a socket is received from blueControlSocket, the QElapsedTimer elapsedLastPackageBlue is restarted.
  • The function MainWindow::update will check every time it is called if elapsedLastPackageBlue has not been restarted for more than one second. If the condition is true, it will stop all blue robot. A similar/equivalent approach was made for the yellowControlSocket.

Alternate Designs

Nothing.

Possible Drawbacks

  • It does not turn the roller and the kick (I still did not find the proper way of doing so);
  • I am still testing it.

Verification Process

Release Notes

Stop the robots when the stop receiving packages for 1 second

@Bollos00 Bollos00 changed the title WIP: Stop the robots when the stop receiving packages for 1 sec Stop the robots when the stop receiving packages for 1 sec Oct 3, 2021
@Bollos00
Copy link
Contributor Author

Bollos00 commented Oct 3, 2021

@mahi97 I tested it with a match test and I think this pull request is ready for review now.

One question, should I change something on the piece of code complained bu the CodeFactor?

@Bollos00
Copy link
Contributor Author

@g3force this pull request is open for quite some time now... do I need to change anything before the pull request is merged?

Copy link
Member

@g3force g3force left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me except for the comments.

src/mainwindow.cpp Outdated Show resolved Hide resolved
src/mainwindow.cpp Show resolved Hide resolved
@Bollos00
Copy link
Contributor Author

@g3force what about now?

@g3force
Copy link
Member

g3force commented Feb 17, 2022

I've fixed the pipelines on master und updated your branch to see if everything is green.

Also, please use the GitHub review functions:
image

Press the cyclic arrows to rerequest review.

@g3force
Copy link
Member

g3force commented Feb 17, 2022

And please fix the CodeFactor issue. One method you modified is too complex now. Move code into a new method.

@g3force g3force self-requested a review January 3, 2024 18:47
@g3force g3force merged commit b49a694 into RoboCup-SSL:master Jan 3, 2024
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the robots stop moving after the simulator stopped receiving packets to move the robots for some time
2 participants